<template>
  <div>
    <children1 :flage="flage"></children1>
    <children2 @changed="change"></children2>
  </div>
</template>

<script>
export default {
  name: 'empty',
  data () {
    return {
      flage: true
    }
  },
  methods: {
    change (val) {
      this.flage = val
    }
  },
  beforeRouteEnter (to, from, next) {
    next(vm => {
      vm.$router.push({ ...to.params.to })
    })
  }
}
</script>
